package org.tissou.client.Services;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;

/**
 * Created by IntelliJ IDEA.
 * User: Claire
 * Date: 16-Mar-2009
 * Time: 18:28:40
 * To change this template use File | Settings | File Templates.
 */
public interface ProprioService extends RemoteService {
  public ProprietaireInfos donneProprio(String nomDuProprietaire);

  /**
   * Utility/Convenience class.
   * Use CompteService.App.getInstance() to access static instance of CompteServiceAsync
   */
  public static class App {
    private static final ProprioServiceAsync ourInstance;

    static {
      ourInstance = (ProprioServiceAsync) GWT.create(ProprioService.class);
      ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "CompteService");
    }

    public static ProprioServiceAsync getInstance() {
      return ourInstance;
    }
  }
}
